/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 苏西西
 * Date: 2023-07-05
 * Time: 8:43
 */
public class Test {
    public static void main(String[] args) {
        MySingleList mySingleList = new MySingleList();
        mySingleList.createLink();
        mySingleList.display();
        System.out.println("-------");
        mySingleList.display();
        System.out.println(mySingleList.contains(100));
        System.out.println("--------------");
        System.out.println(mySingleList.size());
        System.out.println("--------------");
        mySingleList.addFirst(5);
        mySingleList.display();
        mySingleList.addEnd(9);
        mySingleList.addEnd(9);
        mySingleList.addEnd(9);

        mySingleList.display();
        System.out.println("========");


        try{
            mySingleList.addIndex(0,185);
        }catch (IndexOutOfException e){
            e.printStackTrace();
        }
        mySingleList.display();
        System.out.println("=====");
        mySingleList.remove(185);
        mySingleList.display();
        System.out.println("=========");
        mySingleList.removeAllKey(9);
        mySingleList.display();

        mySingleList.clear();
        System.out.println("====");
        mySingleList.display();



    }

}
